
import { Entity, NgField, NgObject, EntityList, NgList, NgDynamic, DynamicEntity, NgEntity } from '@farris/devkit';

@NgEntity({
    originalCode: "employeeM",
    nodeCode: "employeeMs",
    allowEmpty: true
})
export class EmployeeMEntity extends Entity {

    @NgField({
        originalDataField: 'ID',
        dataField: 'id',
        primary: true,
        originalDataFieldType: 'String',
        initValue: '',
        path: 'ID',

        validRules: [
            {
                type: 'required',
                constraints: [true],
            },
            {
                type: 'maxLength',
                constraints: [36],
                message: '最大长度为36',
            }
        ]
    })
    id: string;

    @NgField({
        originalDataField: 'Version',
        dataField: 'version',
        originalDataFieldType: 'DateTime',
        initValue: '0001-01-01T00:00:00',
        path: 'Version',
        enableTimeZone: true,
    })
    version: string;

    @NgField({
        originalDataField: 'Code',
        dataField: 'code',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'Code',

        validRules: [
            {
                type: 'maxLength',
                constraints: [100],
                message: '最大长度为100',
            }
        ]
    })
    code: string;

    @NgField({
        originalDataField: 'Name',
        dataField: 'name',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'Name',

        validRules: [
            {
                type: 'maxLength',
                constraints: [1000],
                message: '最大长度为1000',
            }
        ]
    })
    name: string;

    @NgField({
        originalDataField: 'Remark',
        dataField: 'remark',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'Remark',

        validRules: [
            {
                type: 'maxLength',
                constraints: [1000],
                message: '最大长度为1000',
            }
        ]
    })
    remark: string;

    @NgField({
        originalDataField: 'State',
        dataField: 'state',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'State',

        validRules: [
            {
                type: 'maxLength',
                constraints: [22],
                message: '最大长度为22',
            }
        ]
    })
    state: string;

    @NgField({
        originalDataField: 'Organization',
        dataField: 'organization',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'Organization',

        validRules: [
            {
                type: 'maxLength',
                constraints: [36],
                message: '最大长度为36',
            }
        ]
    })
    organization: string;

    @NgField({
        originalDataField: 'Gender',
        dataField: 'gender',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'Gender',

        validRules: [
            {
                type: 'maxLength',
                constraints: [22],
                message: '最大长度为22',
            }
        ]
    })
    gender: string;

    @NgField({
        originalDataField: 'CountryOrArea',
        dataField: 'countryOrArea',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'CountryOrArea',

        validRules: [
            {
                type: 'maxLength',
                constraints: [22],
                message: '最大长度为22',
            }
        ]
    })
    countryOrArea: string;

    @NgField({
        originalDataField: 'Location',
        dataField: 'location',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'Location',

        validRules: [
            {
                type: 'maxLength',
                constraints: [22],
                message: '最大长度为22',
            }
        ]
    })
    location: string;

    @NgField({
        originalDataField: 'IDNumber',
        dataField: 'idNumber',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'IDNumber',

        validRules: [
            {
                type: 'maxLength',
                constraints: [18],
                message: '最大长度为18',
            }
        ]
    })
    idNumber: string;

    @NgField({
        originalDataField: 'PhoneNumber',
        dataField: 'phoneNumber',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'PhoneNumber',

        validRules: [
            {
                type: 'maxLength',
                constraints: [36],
                message: '最大长度为36',
            }
        ]
    })
    phoneNumber: string;

    @NgField({
        originalDataField: 'Mailbox',
        dataField: 'mailbox',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'Mailbox',

        validRules: [
            {
                type: 'maxLength',
                constraints: [100],
                message: '最大长度为100',
            }
        ]
    })
    mailbox: string;

    @NgField({
        originalDataField: 'zgxl',
        dataField: 'zgxl',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'zgxl',

        validRules: [
            {
                type: 'maxLength',
                constraints: [36],
                message: '最大长度为36',
            }
        ]
    })
    zgxl: string;

    @NgField({
        originalDataField: 'ryzj',
        dataField: 'ryzj',
        originalDataFieldType: 'Number',
        initValue: 0,
        path: 'ryzj',
    })
    ryzj: any;

    @NgField({
        originalDataField: 'yhzh',
        dataField: 'yhzh',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'yhzh',

        validRules: [
            {
                type: 'maxLength',
                constraints: [36],
                message: '最大长度为36',
            }
        ]
    })
    yhzh: string;

    @NgField({
        originalDataField: 'zwlx',
        dataField: 'zwlx',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'zwlx',

        validRules: [
            {
                type: 'maxLength',
                constraints: [36],
                message: '最大长度为36',
            }
        ]
    })
    zwlx: string;

    @NgField({
        originalDataField: 'rygw',
        dataField: 'rygw',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'rygw',

        validRules: [
            {
                type: 'maxLength',
                constraints: [36],
                message: '最大长度为36',
            }
        ]
    })
    rygw: string;

    @NgField({
        originalDataField: 'rybm',
        dataField: 'rybm',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'rybm',

        validRules: [
            {
                type: 'maxLength',
                constraints: [36],
                message: '最大长度为36',
            }
        ]
    })
    rybm: string;

    @NgField({
        originalDataField: 'rygs',
        dataField: 'rygs',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'rygs',

        validRules: [
            {
                type: 'maxLength',
                constraints: [36],
                message: '最大长度为36',
            }
        ]
    })
    rygs: string;

}